<!DOCTYPE html>
<html>
<head>
    <title>领取ID标贴</title>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <link rel="stylesheet" href="${s.base}/mobile/css/weui.min.css">
    <link rel="stylesheet" href="${s.base}/mobile/css/jquery-weui.min.css">
    <link rel="stylesheet" href="${s.base}/mobile/css/base.css">
    <link rel="stylesheet" href="${s.base}/mobile/css/component.css?1232445">
    <style type="text/css">
		body,html{background: #e4e4e4;}
		.xyg-comp-type-two{width:100%; height:auto; background:#ffffff;}
		.xyg-comp-type-two .xyg-comp-type-item{width:50%; height:3.5rem; line-height:3.5rem; text-align:center; float:left; font-size:32px; color:#00000;}
		.xyg-comp-type-two .select-active{ border-bottom:3px solid #09C15F;}
        .xyg-code{width:151.2px; height:189px;margin:40px auto; background: #ffffff;}
        .xyg-code .xyg-code-ewm{width:119px; padding:10px 16.1px; height:119px;}
        .xyg-code  .xyg-code-ewmimage{width:100%; height:100%;}
        .xyg-code .xyg-code-ewm-desc{width:100%; height:20px;line-height:20px; padding-top: 10px; letter-spacing: 0.2rem; font-size: 16px; color:#000000; text-align: center; }
        .xyg-code .xyg-code-ewm-name{width:100%; height:30px;line-height:30px; letter-spacing: 0.2rem; font-size: 16px; color:#000000; text-align: center; }

    </style>
</head>
<!-- 投诉意见 -->
<body>
<!--<div class="xyg-comp-type-two">
    <div class="xyg-comp-type-item select-active">
    投诉
    </div>
    <div class="xyg-comp-type-item">
    建议
    </div>
    <div class="clearBoth"></div>
</div>-->
<div style="width:100%;height:auto;"><img src="/mobile/images/banner1.jpg"></div>
 
 <!--
<div class="xyg-comp-form  margin-top-05rem">
      
	 
	   
	   <div class="xyg-comp-form-item-one">
            <div class="xyg-comp-form-item-title"> 
             投诉的小区
            </div>
            <div class="xyg-comp-form-item-content"> 
             <input type="text" id="communityName" placeholder="请先填写小区信息" />
            </div>
            <div class="clearBoth"></div>
       </div> 
       <div class="xyg-comp-form-item-one">
            <div class="xyg-comp-form-item-title"> 
             投诉的类型
            </div>
            <div class="xyg-comp-form-item-icon">
              <input type="text" id="complainCode" placeholder="请先选择投诉的类型" /> <span><svg class="icon" aria-hidden="true">
              <use xlink:href="#iconxiangyou"></use>
             </svg> </span>
            </div> 
            <div class="clearBoth"></div>
       </div> 

 -->


       <div class="xyg-comp-form-tip">
             标贴内容
       </div>
        <div class="xyg-comp-form-item-one margin-top-05rem">
            <div class="xyg-comp-form-item-title">
                ID号
            </div>
            <div class="xyg-comp-form-item-content">
                <input type="text" value="${webMember.cardNo}" readonly/>
            </div>
            <div class="clearBoth"></div>
        </div>
        <div class="xyg-comp-form-item-one"  style="height: 150px; line-height: 150px;">
            <div class="xyg-comp-form-item-title" style="height: 150px; line-height: 150px;">
                二维码
            </div>
            <div class="xyg-comp-form-item-content"  style="height: 150px; line-height: 150px;">
                <img src="${webMember.qrCode}" style="width: 140px; height: 140px; margin: 5px 0px; float: right;"/>
            </div>
            <div class="clearBoth"></div>
        </div>
        <div class="xyg-comp-form-tip">
            联系人信息
        </div>
        <div class="xyg-comp-form-item-one margin-top-05rem">
            <div class="xyg-comp-form-item-title">
                姓名
            </div>
            <div class="xyg-comp-form-item-content">
                <input type="text" placeholder="请先选择姓名" id="name" />
            </div>
            <div class="clearBoth"></div>
        </div>
        <div class="xyg-comp-form-item-one">
            <div class="xyg-comp-form-item-title">
                联系电话
            </div>
            <div class="xyg-comp-form-item-content">
                <input type="text" placeholder="请先选择联系电话" id="phone" />
            </div>
            <div class="clearBoth"></div>
        </div>
<div class="xyg-comp-form-item margin-top-05rem===">
    <div class="xyg-comp-form-item-textarea-content">
        <textarea class="fontStyle1" id="content" placeholder="请填写接收地址" ></textarea>
    </div>
    <div class="xyg-comp-form-item-upload" style="display: none;">
        <div class="xyg-comp-form-item-upload-pic" id="uploaderFiles" data-objectId="">
        </div>
        <div class="xyg-comp-form-item-upload-btn">
            <img src="${s.base}/mobile/images/icon_upload.png"/>
            <div class="upload-title">照片</div>
            <input id="file" name="file" class="weui-uploader__input" type="file" accept="image/*" multiple onchange="cytImgUpload('file','','uploaderFiles',9, 1)">
        </div>
        <div class="clearBoth"></div>
    </div>
</div>
<input type="button" id="save" class="xyg-btn-one color-bs margin-top-1rem" value="确认提交"/>
  	</div>
</body>
<script src="https://res.wx.qq.com/open/js/jweixin-1.3.2.js"></script>
<script src="${s.base}/mobile/js/jquery-2.1.4.js"></script>
<script src="${s.base}/mobile/js/jquery-weui.js"></script>
<script src="${s.base}/mobile/fonts/iconfont.js"></script>
<script src="${s.base}/mobile/js/component.js"></script>
<script src="${s.base}/mobile/js/base.js"></script>
<script src="${s.base}/mobile/js/ajaxfileupload.js"></script>

<!--js分享代码开始-->
<input type="hidden" value="${jSTicketShareResponse.appid}" id="appid" />
<input type="hidden" value="${jSTicketShareResponse.fxTitle}" id="fxTitle" />
<input type="hidden" value="${jSTicketShareResponse.fxImgUrl}" id="fxImgUrl" />
<input type="hidden" value="${jSTicketShareResponse.fxDesc}" id="fxDesc" />
<input type="hidden" value="${jSTicketShareResponse.fxUrl}" id="fxUrl" />
<input type="hidden" value="${jSTicketShareResponse.nonceStr}" id="nonceStr" />
<input type="hidden" value="${jSTicketShareResponse.timestamp}" id="timestamp" />
<input type="hidden" value="${jSTicketShareResponse.signature}" id="signature" />
<script src="${s.base}/mobile/js/share.js"></script>
<script type="text/javascript">
    var memberId = '${memberId}';
    // 所在区域
   /* var items=[];
    $.ajax({
        type:"post",
        url:"/phone/sysDictContent/listByDictTypes",
        data:{dictTypes:"complain_type"},
        async:false,
        success:function (data) {
            if(data.code=="0"){
                var list = data.data;
                if(list != null && list.length > 0){
                    for (var i=0;i<list.length;i++){
                        var sysDictContent=list[i];
                        var obj={};
                        obj.title=sysDictContent.name;
                        obj.value = sysDictContent.value;
                        items.push(obj);
                    }
                }else{
                    // $("#show").show();
                    return false;
                }
            }
        }
    })
    console.log(items)
    $("#complainCode").select({
        title: "请选择",
        // multi: true,
        min: 2,
        max: 3,
        items: items,
        onChange: function(d) {
            //console.log(this, d);
            //initClass();
        },
        onClose: function (d) {
            //console.log(d);
            //console.log('close')
        },
        onClick: function (d) {
            //console.log(1)
        }
    });*/

    $("#save").on("click", function () {
        /*var communityName = $("#communityName").val();
        if (communityName == null || communityName == "") {
            $.toast("请先填写小区信息", "text");
            return false;
        }
        var complainCode = $("#complainCode").val();
        if (complainCode == null || complainCode == "") {
            $.toast("请先选择投诉的类型", "text");
            return false;
        }*/
        var content = $("#content").val();
        var name = $("#name").val();
        if (name == null || name == "") {
            $.toast("请先填写姓名", "text");
            return false;
        }

        var phone = $("#phone").val();
        if (phone == null || phone == "") {
            $.toast("请先填写联系电话", "text");
            return false;
        }
        if (!(/^1(3|4|5|7|8)\d{9}$/.test(phone))) {
            $.toast("手机号码有误，请重填", "text");
            return false;
        }
        if (content == null || content == "") {
            $.toast("请先填写接收地址", "text");
            return false;
        }
        if (content.length > 300) {
            $.toast("接收地址不能超过150字", "text");
            return false;
        }
        // 图片
        var imageArr = [];
        /*$("#uploaderFiles img").each(function () {
            var image = $(this).attr("src");
            imageArr.push(image)
        });*/
        var param = {
            memberId: memberId,
            content: content,
            name: name,
            phone: phone,
            status: '1',
            image: imageArr.join(",")
        };
        $.showLoading("正在提交中");
        $.post("/phone/recoveryComplainSave", param, function (result) {
            if (0 == result.code) {
                // showLayerAlertNoRefre("操作成功！");
                $.hideLoading();
                $.alert("申请成功，我们会尽快发送给您！",function () {
                    goFistPage(memberId);
                });
            } else {
                $.hideLoading();
                $.alert(result.msg);
            }
        }, "json");
    });
</script>
</html>
